<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>风雪无垢楼</title>
    <link rel="stylesheet" href="css/bootstrap.css">
    <script src="js/jquery-3.3.1.js"></script>
    <script src="js/bootstrap.js"></script>

    <style>
        #body{
            max-width: 720px;
            margin: 0 auto;
            background:url("img/beijing.png") no-repeat  center 0 #0d0d0e;
            background-size:1000px;
            color:#333;
            font-size: 0.26rem;
            text-align:center

        }
        .input1{
            border: 0;
            background-color: transparent;
            color: white;
            height: 60px;
            width: 350px;
            font-size: 50px;
        }
    </style>


</head>
<body id="body">
<script>
    function one() {
        var phone=$("#phone").val();
        $.ajax({
            url:'phone',
            type:'post',
            data:{phone:phone},
            success: function(data){
                if(data==0){
                    $.ajax({
                        url:'duanxin',
                        type:'post',
                        data:{phone:phone},
                        success: function(data){
                            if(data.code==0){
                                $("#but1").val("已发送");
                                $("#but1").attr('disabled',true);
                            }
                        }
                    })
                }else{
                    alert("账号已被注册！")
                }
            }
        })


    }
    function xia() {
        var phone=$("#phone").val();
        var code=$("#code").val();
        $.ajax({
            url:'yanzheng',
            type:'post',
            data:{phone1:phone,code1:code},
            success: function(data){
                if(data==0){
                    alert("验证码错误！")
                }else{
                    window.location="zhuchetwo.html"
                }
            }
        })
    }
</script>
    <div style="height: 400px"></div>
    <font style="color: white;font-size: 50px">手机号：</font><input type="text" id="phone" class="input1">
    <hr width="600px" color="white">
    <div style="height: 10px"></div>
    <font  style="color: white;font-size: 50px">验证码：</font>
<input type="text" id="code" style="width: 200px" class="input1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="获取验证码" id="but1" onclick="one()" class="btn btn-lg btn-primary"><br>
    <hr width="600px" color="white">
    <div style="height: 30px"></div>
    <button class="btn btn-lg btn-primary" style="width: 400px;height: 100px;font-size: 40px" onclick="xia()">下一步</button><br>
    <div style="height: 20px"></div>
    <a href="#"><h2>已有账号</h2></a>

</body>
</html>